import java.util.*;

/**
 * Created by IntelliJ IDEA.
 *
 * @ProjectName leetcode
 * @Author Ding
 * @CreateTime 2022/9/3 22:34 星期六
 */
public class Main3 {
    public static void main(String[] args) {
        int[] arr = new int[]{1,2,3,4,5};
        System.err.println(findSubarrays(arr));
    }

    public static boolean findSubarrays(int[] nums) {
        if (nums.length <= 2) {
            return false;
        }
        Set<Integer> dp = new HashSet<>();
        for (int i = 0; i < nums.length-1; i++) {
            if(!dp.add(nums[i]+nums[i+1])){
                return true;
            }
        }
        return false;
    }
}
